import Vue from 'vue'
import Router from 'vue-router'
import index from '@/views/index'
import Login from '@/views/login'
import Users from '@/components/users/users'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path:'/index',
      name: 'index',
      component: index,
      children:[
        {path:'/users',component:Users}
      ]
    }
  ]
})
